<template>
  <div style="height:100%">
    <div class="public" @mouseenter="addWater = true" @mouseleave="addWater = false">
      <span>费用油耗加水统计</span>
      <div class="work_area_list" v-if="addWater" style="min-width: 180px">
        <!-- <el-select v-model="value" placeholder="请选择">
          <el-option-group
            v-for="group in options"
            :key="group.label"
            :label="group.label">
            <el-option
              v-for="item in group.options"
              :key="item.value"
              :label="item.label"
              :value="item.value" @click="getmethods(item.methods)">
            </el-option>
          </el-option-group>
        </el-select>-->
        <!-- <p class="size14">费用统计</p>
        <ul>
          <li>
            <span @click="opendyclfy">单一车辆费用统计</span>
          </li>
          <li>
            <span @click="openqbclfy">全部车辆费用统计</span>
          </li>
          <li>
            <span @click="openzhfy">综合费用统计</span>
          </li>
        </ul> -->
        <!-- <p class="size14">油耗统计</p> -->
        <ul style="list-style-type:none;">
          <li>
            <span @click="opendyclyhLine">单一车辆油耗曲线</span>
          </li>
          <li>
            <span @click="opendyclyhlc">单一车辆油耗里程统计</span>
          </li>
          <li>
            <span @click="openqbclyhlc">全部车辆油耗里程统计</span>
          </li>
          <li>
            <span @click="openyhlczh">油耗里程综合统计</span>
          </li>
        </ul>
        <!-- <p class="size14">加水统计</p>
        <ul>
          <li>
            <span @click="opendycljs">单一车辆加水统计</span>
          </li>
          <li>
            <span @click="openqbcljs">全部车辆加水统计</span>
          </li>
          <li>
            <span @click="openjszh">加水综合统计</span>
          </li>
        </ul> -->
        <!-- <p class="size14">用车统计</p>
        <ul>
          <li>
            <span @click="openclyc">车辆用车统计</span>
          </li>
        </ul> -->
        <!-- <p class="size14">出车统计</p>
        <ul>
          <li>
            <span @click="opensjcc">司机出车统计</span>
          </li>
        </ul> -->
      </div>
    </div>

    <div class="organization carInformation" v-if="dyclfy.show">
      <h2>
        <span class="iconfont icon-index-infor-"></span>
        <span>单一车辆费用统计</span>
        <i class="iconfont icon-guanbi" @click="dyclfy.show = false"></i>
      </h2>
      <div class="top_box">
        <el-form :inline="true" :model="person" class="demo-form-inline">
          <el-form-item label="车牌号:">
            <el-select v-model="dyclfy.cph" placeholder="车牌号码">
              <el-option
                v-for="(item,index) in dyclfy.cphList"
                :key="index"
                :label="item.LicensePlate"
                :value="item.LicensePlate"
              />
            </el-select>
          </el-form-item>
        </el-form>
      </div>
      <div class="top_box">
        <el-form :inline="true" :model="person" class="demo-form-inline">
          <el-radio v-model="radio" label="1">任意时间段</el-radio>
          <el-form-item label="开始时间">
            <el-date-picker v-model="dyclfy.startDate" type="date" placeholder="选择日期"></el-date-picker>
          </el-form-item>
          <el-form-item label="结束时间">
            <el-date-picker v-model="dyclfy.endDate" type="date" placeholder="选择日期"></el-date-picker>
          </el-form-item>
        </el-form>
      </div>
      <div class="top_box">
        <el-form :inline="true" :model="person" class="demo-form-inline">
          <el-radio v-model="radio" label="2">标准时间段</el-radio>
          <el-form-item label="年:">
            <el-select v-model="dyclfy.year" placeholder="选择年">
              <el-option v-for="(item,index) in yearList" :key="index" :label="item" :value="item" />
            </el-select>
          </el-form-item>
          <el-form-item label="季:">
            <el-checkbox v-model="check1" @change="changeCheck"></el-checkbox>
            <el-select v-model="dyclfy.season" placeholder="选择季" name="seasonSelect">
              <el-option
                v-for="(item,index) in seasonList"
                :key="index"
                :label="item"
                :value="item"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="月:">
            <el-checkbox v-model="check2" @change="changeCheck2"></el-checkbox>
            <el-select v-model="dyclfy.month" placeholder="选择月" name="monthSelect">
              <el-option
                v-for="(item,index) in monthList"
                :key="index"
                :label="item"
                :value="item"
              />
            </el-select>
          </el-form-item>
          <el-form-item style="margin-left: 20px;">
            <el-button type="primary" @click="changeColumn">查 询</el-button>
          </el-form-item>
          <el-form-item>
            <el-button type="success" @click="DyclfytjexportExcel">导出</el-button>
          </el-form-item>
        </el-form>
      </div>
      <div class="car_content">
        <!-- 统计列表 -->
        <el-table
          :data="dyclfy.tableData"
          style="width: 100%"
          border
          highlight-current-row
          v-if="car.listShow"
          height="477"
        >
          <el-table-column
            v-for="(item,index) in tableHead"
            :key="index"
            :label="item.label"
            :property="item.property"
            align="center"
          >
            <template slot-scope="scope">{{scope.row[scope.column.property]}}</template>
          </el-table-column>
          <!-- <el-table-column fixed prop="ID" label="车牌照号" align="center"></el-table-column>
          <el-table-column fixed prop="Dw" label="检车时间" align="center"></el-table-column>
          <el-table-column fixed prop="Cph" label="检车人" align="center"></el-table-column>
          <el-table-column fixed prop="Model" label="检车说明" align="center"></el-table-column>
          <el-table-column fixed prop="Person" label="车检状态" align="center"></el-table-column>
          <el-table-column fixed prop="Buytime" label="预计下次检车时间" align="center" width="150px"></el-table-column>
          <el-table-column fixed prop="Explain" label="车龄" align="center"></el-table-column>
          <el-table-column fixed prop="Usedeptname" label="检车费用" align="center"></el-table-column>
          <el-table-column fixed prop="Vowner" label="应检车时间" align="center"></el-table-column>-->
        </el-table>
      </div>
    </div>

    <div class="organization carInformation" v-if="qbclfy.show">
      <h2>
        <span class="iconfont icon-index-infor-"></span>
        <span>全部车辆费用统计</span>
        <i class="iconfont icon-guanbi" @click="qbclfy.show = false"></i>
      </h2>
      <div class="top_box">
        <el-form :inline="true" :model="person" class="demo-form-inline">
          <el-form-item label="年:">
            <el-select v-model="qbclfy.year" placeholder="选择年">
              <el-option v-for="(item,index) in yearList" :key="index" :label="item" :value="item" />
            </el-select>
          </el-form-item>
          <el-form-item label="季:">
            <el-checkbox v-model="qbclfy.check1" @change="qbclfychangeCheck"></el-checkbox>
            <el-select v-model="qbclfy.season" placeholder="选择季" name="seasonSelect">
              <el-option
                v-for="(item,index) in seasonList"
                :key="index"
                :label="item"
                :value="item"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="月:">
            <el-checkbox v-model="qbclfy.check2" @change="qbclfychangeCheck2"></el-checkbox>
            <el-select v-model="qbclfy.month" placeholder="选择月" name="monthSelect">
              <el-option
                v-for="(item,index) in monthList"
                :key="index"
                :label="item"
                :value="item"
              />
            </el-select>
          </el-form-item>
          <el-form-item style="margin-left: 20px;">
            <el-button type="primary" @click="qbclSearchClick">查 询</el-button>
          </el-form-item>
          <el-form-item>
            <el-button type="success" @click="QbclfytjexportExcel">导出</el-button>
          </el-form-item>
        </el-form>
      </div>
      <div class="car_content">
        <!-- 统计列表 -->
        <el-table
          :data="qbclfy.tableData"
          style="width: 100%"
          border
          highlight-current-row
          v-if="car.listShow"
          height="477"
        >
          <el-table-column
            v-for="(item,index) in qbclfy.tableHead"
            :key="index"
            :label="item.label"
            :property="item.property"
            align="center"
          >
            <template slot-scope="scope">{{scope.row[scope.column.property]}}</template>
          </el-table-column>
        </el-table>
      </div>
    </div>

    <div class="organization carInformation" v-if="zhfy.show">
      <h2>
        <span class="iconfont icon-index-infor-"></span>
        <span>综合费用统计</span>
        <i class="iconfont icon-guanbi" @click="zhfy.show = false"></i>
      </h2>
      <div class="top_box">
        <el-form :inline="true" :model="person" class="demo-form-inline">
          <el-radio v-model="zhfy.radio" label="1">任意时间段</el-radio>
          <el-form-item label="开始时间">
            <el-date-picker v-model="zhfy.startDate" type="date" placeholder="选择日期"></el-date-picker>
          </el-form-item>
          <el-form-item label="结束时间">
            <el-date-picker v-model="zhfy.endDate" type="date" placeholder="选择日期"></el-date-picker>
          </el-form-item>
        </el-form>
      </div>
      <div class="top_box">
        <el-form :inline="true" :model="person" class="demo-form-inline">
          <el-radio v-model="zhfy.radio" label="2">标准时间段</el-radio>
          <el-form-item label="年:">
            <el-select v-model="zhfy.year" placeholder="选择年">
              <el-option v-for="(item,index) in yearList" :key="index" :label="item" :value="item" />
            </el-select>
          </el-form-item>
          <el-form-item label="季:">
            <el-checkbox v-model="zhfy.check1" @change="zhfychangeCheck"></el-checkbox>
            <el-select v-model="zhfy.season" placeholder="选择季" name="seasonSelect">
              <el-option
                v-for="(item,index) in seasonList"
                :key="index"
                :label="item"
                :value="item"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="月:">
            <el-checkbox v-model="zhfy.check2" @change="zhfychangeCheck2"></el-checkbox>
            <el-select v-model="zhfy.month" placeholder="选择月" name="monthSelect">
              <el-option
                v-for="(item,index) in monthList"
                :key="index"
                :label="item"
                :value="item"
              />
            </el-select>
          </el-form-item>
          <el-form-item style="margin-left: 20px;">
            <el-button type="primary" @click="zhfySearchClick">查 询</el-button>
          </el-form-item>
          <el-form-item>
            <el-button type="success" @click="zhfytjexportExcel">导出</el-button>
          </el-form-item>
        </el-form>
      </div>
      <div class="car_content">
        <!-- 统计列表 -->
        <el-table
          :data="zhfy.tableData"
          style="width: 100%"
          border
          highlight-current-row
          v-if="car.listShow"
          height="477"
        >
          <el-table-column
            v-for="(item,index) in zhfy.tableHead"
            :key="index"
            :label="item.label"
            :property="item.property"
            align="center"
          >
            <template slot-scope="scope">{{scope.row[scope.column.property]}}</template>
          </el-table-column>
        </el-table>
      </div>
    </div>
    <div class="organization carInformation" v-if="dyclyhLine.show">
      <h2>
        <span class="iconfont icon-index-infor-"></span>
        <span>单一车辆油耗里程统计</span>
        <i class="iconfont icon-guanbi" @click="dyclyhLine.show = false"></i>
      </h2>
      <div class="top_box">
        <el-form :inline="true" :model="person" class="demo-form-inline">
          <el-form-item label="车牌号:">
            <el-select v-model="dyclyhLine.cph" placeholder="车牌号码">
              <el-option
                v-for="(item,index) in dyclyhLine.cphList"
                :key="index"
                :label="item.LicensePlate"
                :value="item.VID"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="开始时间">
            <el-date-picker
              v-model="dyclyhLine.startDate"
              type="date"
              placeholder="选择日期"
              value-format="yyyy-MM-dd"
            ></el-date-picker>
          </el-form-item>
          <el-form-item label="结束时间">
            <el-date-picker
              v-model="dyclyhLine.endDate"
              type="date"
              placeholder="选择日期"
              value-format="yyyy-MM-dd"
            ></el-date-picker>
          </el-form-item>
          <el-form-item label="时间间隔:">
            <el-select v-model="dyclyhLine.timeInterval" placeholder>
              <el-option
                v-for="(item,index) in dyclyhLine.timeIntervalList"
                :key="index"
                :label="item.label"
                :value="item.value"
              />
            </el-select>
          </el-form-item>
          <el-form-item style="margin-left: 20px;">
            <el-button type="primary" @click="dyclyhLineSearchClick">查 询</el-button>
          </el-form-item>
        </el-form>
      </div>
      <div class="car_content" id="dyclyhLinediv">
        <!-- 统计列表 -->
      </div>
    </div>
    <div class="organization carInformation" v-if="dyclyhlc.show">
      <h2>
        <span class="iconfont icon-index-infor-"></span>
        <span>单一车辆油耗里程统计</span>
        <i class="iconfont icon-guanbi" @click="dyclyhlc.show = false"></i>
      </h2>
      <div class="top_box">
        <el-form :inline="true" :model="person" class="demo-form-inline">
          <el-form-item label="车牌号:">
            <el-select v-model="dyclyhlc.cph" placeholder="车牌号码">
              <el-option
                v-for="(item,index) in dyclyhlc.cphList"
                :key="index"
                :label="item.LicensePlate"
                :value="item.LicensePlate"
              />
            </el-select>
          </el-form-item>
        </el-form>
      </div>
      <div class="top_box">
        <el-form :inline="true" :model="person" class="demo-form-inline">
          <el-radio v-model="dyclyhlc.radio" label="1">任意时间段</el-radio>
          <el-form-item label="开始时间">
            <el-date-picker
              v-model="dyclyhlc.startDate"
              type="date"
              placeholder="选择日期"
              value-format="yyyy-MM-dd"
            ></el-date-picker>
          </el-form-item>
          <el-form-item label="结束时间">
            <el-date-picker
              v-model="dyclyhlc.endDate"
              type="date"
              placeholder="选择日期"
              value-format="yyyy-MM-dd"
            ></el-date-picker>
          </el-form-item>
        </el-form>
      </div>
      <div class="top_box">
        <el-form :inline="true" :model="person" class="demo-form-inline">
          <el-radio v-model="dyclyhlc.radio" label="2">标准时间段</el-radio>
          <el-form-item label="年:">
            <el-select v-model="dyclyhlc.year" placeholder="选择年">
              <el-option v-for="(item,index) in yearList" :key="index" :label="item" :value="item" />
            </el-select>
          </el-form-item>
          <el-form-item label="季:">
            <el-checkbox v-model="dyclyhlc.check1" @change="dyclyhlcchangeCheck"></el-checkbox>
            <el-select v-model="dyclyhlc.season" placeholder="选择季" name="seasonSelect">
              <el-option
                v-for="(item,index) in seasonList"
                :key="index"
                :label="item"
                :value="item"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="月:">
            <el-checkbox v-model="dyclyhlc.check2" @change="dyclyhlcchangeCheck2"></el-checkbox>
            <el-select v-model="dyclyhlc.month" placeholder="选择月" name="monthSelect">
              <el-option
                v-for="(item,index) in monthList"
                :key="index"
                :label="item"
                :value="item"
              />
            </el-select>
          </el-form-item>
          <el-form-item style="margin-left: 20px;">
            <el-button type="primary" @click="dyclyhlcSearchClick">查 询</el-button>
          </el-form-item>
          <el-form-item>
            <el-button type="success" @click="dyclyhlcexportExcel">导出</el-button>
          </el-form-item>
        </el-form>
      </div>
      <div class="car_content">
        <!-- 统计列表 -->
        <el-table
          :data="dyclyhlc.tableData"
          style="width: 100%"
          border
          highlight-current-row
          v-if="car.listShow"
          height="477"
        >
          <!-- <el-table-column v-for="(item,index) in tableHead" :key="index" :label="item.label" :property="item.property" align="center">
              <template slot-scope="scope">{{scope.row[scope.column.property]}}</template>
          </el-table-column>-->
          <el-table-column fixed prop="车牌号" label="车牌号" align="center"></el-table-column>
          <el-table-column fixed prop="时间" label="时间" align="center"></el-table-column>
          <el-table-column fixed prop="耗油量" label="耗油量" align="center"></el-table-column>
          <el-table-column fixed prop="加油量" label="加油量" align="center"></el-table-column>
          <el-table-column fixed prop="加油次数" label="加油次数" align="center"></el-table-column>
          <el-table-column fixed prop="行驶里程" label="行驶里程" align="center" width="150px"></el-table-column>
        </el-table>
      </div>
    </div>

    <div class="organization carInformation" v-if="qbclyhlc.show">
      <h2>
        <span class="iconfont icon-index-infor-"></span>
        <span>全部车辆油耗里程统计</span>
        <i class="iconfont icon-guanbi" @click="qbclyhlc.show = false"></i>
      </h2>
      <div class="top_box">
        <el-form :inline="true" :model="person" class="demo-form-inline">
          <el-form-item label="年:">
            <el-select v-model="qbclyhlc.year" placeholder="选择年">
              <el-option v-for="(item,index) in yearList" :key="index" :label="item" :value="item" />
            </el-select>
          </el-form-item>
          <el-form-item label="季:">
            <el-checkbox v-model="qbclyhlc.check1" @change="qbclyhlcchangeCheck"></el-checkbox>
            <el-select v-model="qbclyhlc.season" placeholder="选择季" name="seasonSelect">
              <el-option
                v-for="(item,index) in seasonList"
                :key="index"
                :label="item"
                :value="item"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="月:">
            <el-checkbox v-model="qbclyhlc.check2" @change="qbclyhlcchangeCheck2"></el-checkbox>
            <el-select v-model="qbclyhlc.month" placeholder="选择月" name="monthSelect">
              <el-option
                v-for="(item,index) in monthList"
                :key="index"
                :label="item"
                :value="item"
              />
            </el-select>
          </el-form-item>
          <el-form-item style="margin-left: 20px;">
            <el-button type="primary" @click="qbclyhlcSearchClick">查 询</el-button>
          </el-form-item>
          <el-form-item>
            <el-button type="success" @click="qbclyhlctjexportExcel">导出</el-button>
          </el-form-item>
        </el-form>
      </div>
      <div class="car_content">
        <!-- 统计列表 -->
        <el-table
          :data="qbclyhlc.tableData"
          style="width: 100%"
          border
          highlight-current-row
          v-if="car.listShow"
          height="477"
        >
          <el-table-column
            v-for="(item,index) in qbclyhlc.tableHead"
            :key="index"
            :label="item.label"
            :property="item.property"
            align="center"
          >
            <template slot-scope="scope">{{scope.row[scope.column.property]}}</template>
          </el-table-column>
        </el-table>
      </div>
    </div>

    <div class="organization carInformation" v-if="yhlczh.show">
      <h2>
        <span class="iconfont icon-index-infor-"></span>
        <span>油耗里程综合统计</span>
        <i class="iconfont icon-guanbi" @click="yhlczh.show = false"></i>
      </h2>

      <div class="top_box">
        <el-form :inline="true" :model="person" class="demo-form-inline">
          <el-form-item label="年:">
            <el-select v-model="yhlczh.year" placeholder="选择年">
              <el-option v-for="(item,index) in yearList" :key="index" :label="item" :value="item" />
            </el-select>
          </el-form-item>
          <el-form-item label="季:">
            <el-checkbox v-model="yhlczh.check1" @change="yhlczhchangeCheck"></el-checkbox>
            <el-select v-model="yhlczh.season" placeholder="选择季" name="seasonSelect">
              <el-option
                v-for="(item,index) in seasonList"
                :key="index"
                :label="item"
                :value="item"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="月:">
            <el-checkbox v-model="yhlczh.check2" @change="yhlczhchangeCheck2"></el-checkbox>
            <el-select v-model="yhlczh.month" placeholder="选择月" name="monthSelect">
              <el-option
                v-for="(item,index) in monthList"
                :key="index"
                :label="item"
                :value="item"
              />
            </el-select>
          </el-form-item>
          <el-form-item style="margin-left: 20px;">
            <el-button type="primary" @click="yhlczhSearchClick">查 询</el-button>
          </el-form-item>
          <el-form-item>
            <el-button type="success" @click="yhlczhexportExcel">导出</el-button>
          </el-form-item>
        </el-form>
      </div>
      <div class="car_content">
        <!-- 统计列表 -->
        <el-table
          :data="yhlczh.tableData"
          style="width: 100%"
          border
          highlight-current-row
          v-if="car.listShow"
          height="477"
        >
          <el-table-column fixed prop="时间" label="时间" align="center"></el-table-column>
          <el-table-column fixed prop="耗油量" label="耗油量" align="center"></el-table-column>
          <el-table-column fixed prop="加油量" label="加油量" align="center"></el-table-column>
          <el-table-column fixed prop="加油次数" label="加油次数" align="center"></el-table-column>
          <el-table-column fixed prop="行驶里程" label="行驶里程" align="center" width="150px"></el-table-column>
        </el-table>
      </div>
    </div>

    <div class="organization carInformation" v-if="dycljs.show">
      <h2>
        <span class="iconfont icon-index-infor-"></span>
        <span>单一车辆加水统计</span>
        <i class="iconfont icon-guanbi" @click="dycljs.show = false"></i>
      </h2>
      <div class="top_box">
        <el-form :inline="true" :model="person" class="demo-form-inline">
          <el-form-item label="车牌号:">
            <el-select v-model="dycljs.cph" placeholder="车牌号码">
              <el-option
                v-for="(item,index) in dyclyhlc.cphList"
                :key="index"
                :label="item.LicensePlate"
                :value="item.LicensePlate"
              />
            </el-select>
          </el-form-item>
        </el-form>
      </div>
      <div class="top_box">
        <el-form :inline="true" :model="person" class="demo-form-inline">
          <el-radio v-model="dycljs.radio" label="1">任意时间段</el-radio>
          <el-form-item label="开始时间">
            <el-date-picker
              v-model="dycljs.startDate"
              type="date"
              placeholder="选择日期"
              value-format="yyyy-MM-dd"
            ></el-date-picker>
          </el-form-item>
          <el-form-item label="结束时间">
            <el-date-picker
              v-model="dycljs.endDate"
              type="date"
              placeholder="选择日期"
              value-format="yyyy-MM-dd"
            ></el-date-picker>
          </el-form-item>
        </el-form>
      </div>
      <div class="top_box">
        <el-form :inline="true" :model="person" class="demo-form-inline">
          <el-radio v-model="dycljs.radio" label="2">标准时间段</el-radio>
          <el-form-item label="年:">
            <el-select v-model="dycljs.year" placeholder="选择年">
              <el-option v-for="(item,index) in yearList" :key="index" :label="item" :value="item" />
            </el-select>
          </el-form-item>
          <el-form-item label="季:">
            <el-checkbox v-model="dycljs.check1" @change="dycljschangeCheck"></el-checkbox>
            <el-select v-model="dycljs.season" placeholder="选择季" name="seasonSelect">
              <el-option
                v-for="(item,index) in seasonList"
                :key="index"
                :label="item"
                :value="item"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="月:">
            <el-checkbox v-model="dycljs.check2" @change="dycljschangeCheck2"></el-checkbox>
            <el-select v-model="dycljs.month" placeholder="选择月" name="monthSelect">
              <el-option
                v-for="(item,index) in monthList"
                :key="index"
                :label="item"
                :value="item"
              />
            </el-select>
          </el-form-item>
          <el-form-item style="margin-left: 20px;">
            <el-button type="primary" @click="dycljsSearchClick">查 询</el-button>
          </el-form-item>
          <el-form-item>
            <el-button type="success" @click="dycljsexportExcel">导出</el-button>
          </el-form-item>
        </el-form>
      </div>
      <div class="car_content">
        <!-- 统计列表 -->
        <el-table
          :data="dycljs.tableData"
          style="width: 100%"
          border
          highlight-current-row
          v-if="car.listShow"
          height="477"
        >
          <!-- <el-table-column v-for="(item,index) in tableHead" :key="index" :label="item.label" :property="item.property" align="center">
              <template slot-scope="scope">{{scope.row[scope.column.property]}}</template>
          </el-table-column>-->
          <el-table-column fixed prop="车牌号" label="车牌号" align="center"></el-table-column>
          <el-table-column fixed prop="时间" label="时间" align="center"></el-table-column>
          <el-table-column fixed prop="加水量" label="加水量" align="center"></el-table-column>
          <el-table-column fixed prop="加水次数" label="加水次数" align="center"></el-table-column>
        </el-table>
      </div>
    </div>
    <div class="organization carInformation" v-if="qbcljs.show">
      <h2>
        <span class="iconfont icon-index-infor-"></span>
        <span>全部车辆加水统计</span>
        <i class="iconfont icon-guanbi" @click="qbcljs.show = false"></i>
      </h2>
      <div class="top_box">
        <el-form :inline="true" :model="person" class="demo-form-inline">
          <el-form-item label="年:">
            <el-select v-model="qbcljs.year" placeholder="选择年">
              <el-option v-for="(item,index) in yearList" :key="index" :label="item" :value="item" />
            </el-select>
          </el-form-item>
          <el-form-item label="季:">
            <el-checkbox v-model="qbcljs.check1" @change="qbcljschangeCheck"></el-checkbox>
            <el-select v-model="qbcljs.season" placeholder="选择季" name="seasonSelect">
              <el-option
                v-for="(item,index) in seasonList"
                :key="index"
                :label="item"
                :value="item"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="月:">
            <el-checkbox v-model="qbcljs.check2" @change="qbcljschangeCheck2"></el-checkbox>
            <el-select v-model="qbcljs.month" placeholder="选择月" name="monthSelect">
              <el-option
                v-for="(item,index) in monthList"
                :key="index"
                :label="item"
                :value="item"
              />
            </el-select>
          </el-form-item>
          <el-form-item style="margin-left: 20px;">
            <el-button type="primary" @click="qbcljsSearchClick">查 询</el-button>
          </el-form-item>
          <el-form-item>
            <el-button type="success" @click="qbcljsexportExcel">导出</el-button>
          </el-form-item>
        </el-form>
      </div>
      <div class="car_content">
        <!-- 统计列表 -->
        <el-table
          :data="qbcljs.tableData"
          style="width: 100%"
          border
          highlight-current-row
          v-if="car.listShow"
          height="477"
        >
          <el-table-column
            v-for="(item,index) in qbcljs.tableHead"
            :key="index"
            :label="item.label"
            :property="item.property"
            align="center"
          >
            <template slot-scope="scope">{{scope.row[scope.column.property]}}</template>
          </el-table-column>
        </el-table>
      </div>
    </div>
    <div class="organization carInformation" v-if="jszh.show">
      <h2>
        <span class="iconfont icon-index-infor-"></span>
        <span>加水综合统计</span>
        <i class="iconfont icon-guanbi" @click="jszh.show = false"></i>
      </h2>

      <div class="top_box">
        <el-form :inline="true" :model="person" class="demo-form-inline">
          <el-form-item label="年:">
            <el-select v-model="jszh.year" placeholder="选择年">
              <el-option v-for="(item,index) in yearList" :key="index" :label="item" :value="item" />
            </el-select>
          </el-form-item>
          <el-form-item label="季:">
            <el-checkbox v-model="jszh.check1" @change="jszhchangeCheck"></el-checkbox>
            <el-select v-model="jszh.season" placeholder="选择季" name="seasonSelect">
              <el-option
                v-for="(item,index) in seasonList"
                :key="index"
                :label="item"
                :value="item"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="月:">
            <el-checkbox v-model="jszh.check2" @change="jszhchangeCheck2"></el-checkbox>
            <el-select v-model="jszh.month" placeholder="选择月" name="monthSelect">
              <el-option
                v-for="(item,index) in monthList"
                :key="index"
                :label="item"
                :value="item"
              />
            </el-select>
          </el-form-item>
          <el-form-item style="margin-left: 20px;">
            <el-button type="primary" @click="jszhSearchClick">查 询</el-button>
          </el-form-item>
          <el-form-item>
            <el-button type="success" @click="jszhexportExcel">导出</el-button>
          </el-form-item>
        </el-form>
      </div>
      <div class="car_content">
        <!-- 统计列表 -->
        <el-table
          :data="jszh.tableData"
          style="width: 100%"
          border
          highlight-current-row
          v-if="car.listShow"
          height="477"
        >
          <el-table-column fixed prop="时间" label="时间" align="center"></el-table-column>
          <el-table-column fixed prop="加水量" label="加水量" align="center"></el-table-column>
          <el-table-column fixed prop="加水次数" label="加水次数" align="center"></el-table-column>
        </el-table>
      </div>
    </div>
    <div class="organization carInformation" v-if="clyc.show">
      <h2>
        <span class="iconfont icon-index-infor-"></span>
        <span>车辆用车统计</span>
        <i class="iconfont icon-guanbi" @click="clyc.show = false"></i>
      </h2>

      <div class="top_box">
        <el-form :inline="true" :model="person" class="demo-form-inline">
          <el-form-item label="年:">
            <el-select v-model="clyc.year" placeholder="选择年">
              <el-option v-for="(item,index) in yearList" :key="index" :label="item" :value="item" />
            </el-select>
          </el-form-item>
          <el-form-item label="季:">
            <el-checkbox v-model="clyc.check1" @change="clycchangeCheck"></el-checkbox>
            <el-select v-model="clyc.season" placeholder="选择季" name="seasonSelect">
              <el-option
                v-for="(item,index) in seasonList"
                :key="index"
                :label="item"
                :value="item"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="月:">
            <el-checkbox v-model="clyc.check2" @change="clycchangeCheck2"></el-checkbox>
            <el-select v-model="clyc.month" placeholder="选择月" name="monthSelect">
              <el-option
                v-for="(item,index) in monthList"
                :key="index"
                :label="item"
                :value="item"
              />
            </el-select>
          </el-form-item>
          <el-form-item style="margin-left: 20px;">
            <el-button type="primary" @click="clycSearchClick">查 询</el-button>
          </el-form-item>
          <el-form-item>
            <el-button type="success" @click="clycexportExcel">导出</el-button>
          </el-form-item>
        </el-form>
      </div>
      <div class="car_content">
        <!-- 统计列表 -->
        <el-table
          :data="clyc.tableData"
          style="width: 100%"
          border
          highlight-current-row
          v-if="car.listShow"
          height="477"
        >
          <el-table-column
            v-for="(item,index) in clyc.tableHead"
            :key="index"
            :label="item.label"
            :property="item.property"
            align="center"
          >
            <template slot-scope="scope">{{scope.row[scope.column.property]}}</template>
          </el-table-column>
        </el-table>
      </div>
    </div>
    <div class="organization carInformation" v-if="sjcc.show">
      <h2>
        <span class="iconfont icon-index-infor-"></span>
        <span>司机出车统计</span>
        <i class="iconfont icon-guanbi" @click="sjcc.show = false"></i>
      </h2>

      <div class="top_box">
        <el-form :inline="true" :model="person" class="demo-form-inline">
          <el-form-item label="年:">
            <el-select v-model="sjcc.year" placeholder="选择年">
              <el-option v-for="(item,index) in yearList" :key="index" :label="item" :value="item" />
            </el-select>
          </el-form-item>
          <el-form-item label="季:">
            <el-checkbox v-model="sjcc.check1" @change="sjccchangeCheck"></el-checkbox>
            <el-select v-model="sjcc.season" placeholder="选择季" name="seasonSelect">
              <el-option
                v-for="(item,index) in seasonList"
                :key="index"
                :label="item"
                :value="item"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="月:">
            <el-checkbox v-model="sjcc.check2" @change="sjccchangeCheck2"></el-checkbox>
            <el-select v-model="sjcc.month" placeholder="选择月" name="monthSelect">
              <el-option
                v-for="(item,index) in monthList"
                :key="index"
                :label="item"
                :value="item"
              />
            </el-select>
          </el-form-item>
          <el-form-item style="margin-left: 20px;">
            <el-button type="primary" @click="sjccSearchClick">查 询</el-button>
          </el-form-item>
          <el-form-item>
            <el-button type="success" @click="sjccexportExcel">导出</el-button>
          </el-form-item>
        </el-form>
      </div>
      <div class="car_content">
        <!-- 统计列表 -->
        <el-table
          :data="sjcc.tableData"
          style="width: 100%"
          border
          highlight-current-row
          v-if="car.listShow"
          height="477"
        >
          <el-table-column
            v-for="(item,index) in sjcc.tableHead"
            :key="index"
            :label="item.label"
            :property="item.property"
            align="center"
          >
            <template slot-scope="scope">{{scope.row[scope.column.property]}}</template>
          </el-table-column>
        </el-table>
      </div>
    </div>

    <div class="attendance_work_time2" v-if="YZT.show">
      <h2>
        <span class="iconfont icon-shijian"></span>
        <span>统计日期设置</span>
        <i class="iconfont icon-guanbi" @click="YZT.show=false"></i>
      </h2>
      <div class="attendance_content">
        <el-form :model="YZT.workTime" class="demo-form-inline wid100">
          <el-form-item>
            <el-radio v-model="YZT.radio" label="1" class="wid70">按日期</el-radio>
            <el-date-picker v-model="YZT.date" type="date" placeholder="选择日期" value-format="yyyy-MM-dd"></el-date-picker>
          </el-form-item>
          <el-form-item>
            <el-radio v-model="YZT.radio" label="2">按月份</el-radio>
            <el-date-picker v-model="YZT.month" type="month" placeholder="选择月份" value-format="yyyy-MM"></el-date-picker>
            <div class="attendance_btns">
              <el-button type="primary" @click="yztTj">查 询</el-button>
              <el-button type="danger" @click="closeYZT">关 闭</el-button>
            </div>
          </el-form-item>
        </el-form>
      </div>
    </div>
  </div>
</template>

<script>
import eventBus from '@/eventBus.js'
import export2Excel from '@/utils/exportExcel/index.js'
import MapStr from '@/main.js'
import {formatDate} from '@/common/js/date.js'
import * as echarts from 'echarts';
export default {
  data () {
    function toYear () {
      return new Date().getFullYear().toString()
    }
    return {
      YZT: {
        show: false,
        date: '',
        month: '',
        radio: '1',
        workTime: ''
      },
      tableHead: [
        {
          label: '时间',
          property: '时间'
        }, {
          label: '车牌号',
          property: '车牌号'
        }, {
          label: '加油费用',
          property: '加油费用'
        }, {
          label: '保养费用',
          property: '保养费用'
        }, {
          label: '维修费用',
          property: '维修费用'
        }, {
          label: '保险费用',
          property: '保险费用'
        }, {
          label: '年检费用',
          property: '年检费用'
        }, {
          label: '罚款费用',
          property: '罚款费用'
        }, {
          label: '总费用',
          property: '总费用'
        }
      ],
      check1: false,
      check2: false,
      radio: '1',
      value1: '',
      yearList: ['2018年', '2019年', '2020年', '2021年', '2022年', '2023年', '2024年', '2025年', '2026年', '2027年', '2028年'],
      seasonList: ['第一季度', '第二季度', '第三季度', '第四季度'],
      monthList: ['1月',
        '2月',
        '3月',
        '4月',
        '5月',
        '6月',
        '7月',
        '8月',
        '9月',
        '10月',
        '11月',
        '12月'],
      trafficManger: false,
      carInformation: {
        show: false
      },
      person: {
        show: false,
        name: '',
        client: '',
        clientList: [],
        dataList: [],
        listShow: true
      },
      car: {
        show: false,
        typeList: ['', '吸尘车', '小型机扫车', '机扫车', '洒水车', '洗路车', '高压清洗车', '除雪车', '挤压车', '垃圾车', '多功能车', '其他'],
        carCondition: ['', '正常使用', '拟报废', '已报废'],
        dataList: [],
        listShow: true
      },
      //记录合集数据
      records: {
        //车检记录
        cjjlList: [],
        //车险记录
        cxjlList: [],
        //维修记录
        wxjlList: [],
        //保养记录
        byjlList: [],
        //加油记录
        jyjlList: [],
        //违章记录
        wzjlList: [],
        //违规记录
        wgjlList: [],
        //加水记录
        jsjlList: []
      },
      addWater: false,
      // carInformation: {
      //   show: false
      // },
      //单一车辆费用统计
      dyclfy: {
        show: false,//是否显示
        cphList: [],//车牌号列表
        cph: '',//车牌号
        startDate: '',//开始日期
        endDate: '',//结束日期
        year: toYear(),//年
        month: '',//月
        season: '',//季
        tableData: [],//列表数据
        tHeader: [],
        filterVal: [],
        excelName: []//导出excel名称
      },
      //单一车辆费用统计查询
      dyclfySearch: {
        carNo: '',
        StartDate: '',
        endDate: '',
        season: '',
        month: '',
        year: '',
        type: ''
      },
      //全部车辆费用统计
      qbclfy: {
        check1: false,
        check2: false,
        show: false,
        tableHead: [
          {
            label: '时间',
            property: '时间'
          }, {
            label: '车牌号',
            property: '车牌号'
          }, {
            label: '加油费用',
            property: '加油费用'
          }, {
            label: '保养费用',
            property: '保养费用'
          }, {
            label: '维修费用',
            property: '维修费用'
          }, {
            label: '保险费用',
            property: '保险费用'
          }, {
            label: '年检费用',
            property: '年检费用'
          }, {
            label: '罚款费用',
            property: '罚款费用'
          }, {
            label: '总费用',
            property: '总费用'
          }
        ],
        year: toYear(),//年
        month: '',//月
        season: '',//季
        tableData: [],//列表数据
        tHeader: [],
        filterVal: [],
        excelName: []//导出excel名称
      },
      //全部车辆费用统计查询
      qbclfySearch: {
        clientNo: '',
        season: '',
        month: '',
        year: '',
        type: ''
      },
      //综合费用统计
      zhfy: {
        show: false,
        startDate: '',//开始日期
        endDate: '',//结束日期
        year: toYear(),//年
        month: '',//月
        season: '',//季
        tableData: [],//列表数据
        tHeader: [],
        filterVal: [],
        excelName: [],//导出excel名称
        radio: '1',
        check1: false,
        check2: false,
        tableHead: [
          {
            label: '时间',
            property: '时间'
          }, {
            label: '加油费用',
            property: '加油费用'
          }, {
            label: '保养费用',
            property: '保养费用'
          }, {
            label: '维修费用',
            property: '维修费用'
          }, {
            label: '保险费用',
            property: '保险费用'
          }, {
            label: '年检费用',
            property: '年检费用'
          }, {
            label: '罚款费用',
            property: '罚款费用'
          }, {
            label: '总费用',
            property: '总费用'
          }
        ],
      },
      zhfySearch: {
        StartDate: '',
        endDate: '',
        season: '',
        month: '',
        year: '',
        type: '',
        clientNo: '',
      },
      //单一车辆油耗曲线
      dyclyhLine: {
        show: false,
        cphList: [],//车牌号列表
        cph: '',//车牌号
        timeInterval: '',//时间间隔
        timeIntervalList: [{
          label: '10分钟',
          value: '10'
        }, {
          label: '30分钟',
          value: '30'
        }, {
          label: '1小时',
          value: '60'
        }, {
          label: '12小时',
          value: '720'
        }, {
          label: '24小时',
          value: '1440'
        }],//时间间隔选项
        startDate: '',//开始日期
        endDate: '',//结束日期
        tableData: [],//列表数据
        tHeader: [],
        filterVal: [],
        excelName: [],//导出excel名称
        radio: '1',
        check1: false,
        check2: false
      },
      //单一车辆油耗里程统计
      dyclyhlc: {
        show: false,
        cphList: [],//车牌号列表
        cph: '',//车牌号
        startDate: '',//开始日期
        endDate: '',//结束日期
        year: toYear(),//年
        month: '',//月
        season: '',//季
        tableData: [],//列表数据
        tHeader: [],
        filterVal: [],
        excelName: [],//导出excel名称
        radio: '1',
        check1: false,
        check2: false
      },
      dyclyhlcSearch: {
        carNo: '',
        StartDate: '',
        endDate: '',
        season: '',
        month: '',
        year: '',
        type: '',
        clientNo: ''
      },
      //全部车辆油耗里程统计
      qbclyhlc: {
        check1: false,
        check2: false,
        show: false,
        tableHead: [
          {
            label: '时间',
            property: '时间'
          }, {
            label: '车牌号',
            property: '车牌号'
          }, {
            label: '耗油量',
            property: '耗油量'
          }, {
            label: '加油量',
            property: '加油量'
          }, {
            label: '加油次数',
            property: '加油次数'
          }, {
            label: '行驶里程',
            property: '行驶里程'
          }
        ],
        year: toYear(),//年
        month: '',//月
        season: '',//季
        tableData: [],//列表数据
        tHeader: [],
        filterVal: [],
        excelName: []//导出excel名称
      },
      qbclyhlcSearch: {
        clientNo: '',
        season: '',
        month: '',
        year: '',
        type: ''
      },
      //油耗里程综合统计
      yhlczh: {
        show: false,
        year: toYear(),//年
        month: '',//月
        season: '',//季
        tableData: [],//列表数据
        tHeader: [],
        filterVal: [],
        excelName: [],//导出excel名称
        radio: '1',
        check1: false,
        check2: false,
        tableHead: [
          {
            label: '时间',
            property: '时间'
          }, {
            label: '耗油量',
            property: '耗油量'
          }, {
            label: '加油量',
            property: '加油量'
          }, {
            label: '加油次数',
            property: '加油次数'
          }, {
            label: '行驶里程',
            property: '行驶里程'
          }
        ],
      },
      yhlczhSearch: {
        season: '',
        month: '',
        year: '',
        type: '',
        clientNo: '',
      },
      //单一车辆加水统计
      dycljs: {
        show: false,
        cphList: [],//车牌号列表
        cph: '',//车牌号
        startDate: '',//开始日期
        endDate: '',//结束日期
        year: toYear(),//年
        month: '',//月
        season: '',//季
        tableData: [],//列表数据
        tHeader: [],
        filterVal: [],
        excelName: [],//导出excel名称
        radio: '1',
        check1: false,
        check2: false
      },
      dycljsSearch: {
        carNo: '',
        StartDate: '',
        endDate: '',
        season: '',
        month: '',
        year: '',
        type: '',
        clientNo: ''
      },
      //全部车辆加水统计
      qbcljs: {
        check1: false,
        check2: false,
        show: false,
        tableHead: [
          {
            label: '时间',
            property: '时间'
          }, {
            label: '车牌号',
            property: '车牌号'
          }, {
            label: '加水量',
            property: '加水量'
          }, {
            label: '加水次数',
            property: '加水次数'
          }
        ],
        year: toYear(),//年
        month: '',//月
        season: '',//季
        tableData: [],//列表数据
        tHeader: [],
        filterVal: [],
        excelName: []//导出excel名称
      },
      qbcljsSearch: {
        carNo: '',
        StartDate: '',
        endDate: '',
        clientNo: '',
        season: '',
        month: '',
        year: '',
        type: ''
      },
      //加水综合统计
      jszh: {
        show: false,
        year: toYear(),//年
        month: '',//月
        season: '',//季
        tableData: [],//列表数据
        tHeader: [],
        filterVal: [],
        excelName: [],//导出excel名称
        radio: '1',
        check1: false,
        check2: false,
        tableHead: [
          {
            label: '时间',
            property: '时间'
          }, {
            label: '加水量',
            property: '加水量'
          }, {
            label: '加水次数',
            property: '加水次数'
          }
        ],
      },
      jszhSearch: {
        carNo: '',
        season: '',
        month: '',
        year: '',
        type: '',
        clientNo: '',
      },
      //车辆用车统计
      clyc: {
        show: false,
        year: toYear(),//年
        month: '',//月
        season: '',//季
        tableData: [],//列表数据
        tHeader: [],
        filterVal: [],
        excelName: [],//导出excel名称
        radio: '1',
        check1: false,
        check2: false,
        tableHead: [
          {
            label: '时间',
            property: '时间'
          }, {
            label: '车牌号',
            property: '车牌号'
          }, {
            label: '用车次数',
            property: '用车次数'
          }, {
            label: '行驶里程',
            property: '行驶里程'
          }, {
            label: '行驶时间',
            property: '行驶时间'
          }
        ]
      },
      clycSearch: {
        carNo: '',
        season: '',
        month: '',
        year: '',
        type: '',
        clientNo: '',
      },
      //司机出车统计
      sjcc: {
        show: false,
        year: toYear(),//年
        month: '',//月
        season: '',//季
        tableData: [],//列表数据
        tHeader: [],
        filterVal: [],
        excelName: [],//导出excel名称
        radio: '1',
        check1: false,
        check2: false,
        tableHead: [
          {
            label: '时间',
            property: '时间'
          }, {
            label: '驾驶员',
            property: '驾驶员'
          }, {
            label: '用车次数',
            property: '用车次数'
          }, {
            label: '行驶里程',
            property: '行驶里程'
          }, {
            label: '行驶时间',
            property: '行驶时间'
          }
        ]
      },
      sjccSearch: {
        carNo: '',
        season: '',
        month: '',
        year: '',
        type: '',
        clientNo: '',
      }
    }
  },
  created () {
    eventBus.$on('closeCover', val => (this.organization.show = val))
    this.getLisencePlateList()
  },
  methods: {
    openYZT () {
      this.YZT.show = true
      this.YZT.date = formatDate(new Date(), 'yyyy-MM-dd')
      this.YZT.month = formatDate(new Date(), 'yyyy-MM')
    },
    closeYZT () {
      this.YZT.show = false
    },
    yztTj () {
      let dateTime = ''
      if (this.YZT.radio == "1")
        dateTime = this.YZT.date
      else if (this.YZT.radio == "2")
        dateTime = this.YZT.month
      // let date = new Date()
      // let seperator1 = "-"
      // let year = date.getFullYear()
      // let month = date.getMonth() + 1
      // if (month >= 1 && month <= 9) {
      //   month = "0" + month
      // }
      // let DateTime = year + seperator1 + month
      // window.open('http://111.160.78.62:9936/indexPerson.html?user=' + user + '&&date=' + dateTime, '_blank')
      window.open('http://111.160.78.62:9936/indexService.html?user=' + `${this.$route.query.user}` + '&&date=' + dateTime + '&&ClientNo=' + localStorage.getItem('CLIENT_NO'), '_blank')
    },
    // dat (val) {
    //   var year = val.getFullYear();
    //   var month =
    //     val.getMonth() + 1 > 9 ? val.getMonth() + 1 : "0" + (val.getMonth() + 1);
    //   var d = val.getDate();
    //   if (d < 10)
    //     d = "0" + d;
    //   return year + "-" + month + "-" + d;
    // },
    // mont (val) {
    //   var year = val.getFullYear();
    //   var month =
    //     val.getMonth() + 1 > 9 ? val.getMonth() + 1 : "0" + (val.getMonth() + 1);
    //   // var d = val.getDate();
    //   return year + "-" + month;
    // },
    //打开单一车辆费用统计
    opendyclfy () {
      this.dyclfy.show = true
      // console.log('11111111111111')
    },
    //获取车牌列表
    async getLisencePlateList () {
      // let { data } = await this.$Http.get('/DataListCompany/GetLisencePlateApi?ClientNo=' + localStorage.getItem('CLIENT_NO'))
      // debugger
      // 原始数据
      this.dyclfy.cphList = [{"VID":17165,"LicensePlate":"津C95726"}]
      this.dyclyhlc.cphList = [{"VID":17165,"LicensePlate":"津C95726"}]
      this.dyclyhLine.cphList = [{"VID":17165,"LicensePlate":"津C95726"}]
      // console.log(data)
    },
    //单一车辆费用统计列表
    async getDychfytjList () {
      debugger
      if (this.radio == '1') {
        this.dyclfySearch = {
          carNo: this.dyclfy.cph,
          StartDate: this.dyclfy.startDate,
          endDate: this.dyclfy.endDate,
          season: '',
          month: '',
          year: '',
          type: 'E_时间'
        }
        this.tableHead = [
          {
            label: '时间',
            property: '时间'
          }, {
            label: '车牌号',
            property: '车牌号'
          }, {
            label: '加油费用',
            property: '加油费用'
          }, {
            label: '保养费用',
            property: '保养费用'
          }, {
            label: '维修费用',
            property: '维修费用'
          }, {
            label: '保险费用',
            property: '保险费用'
          }, {
            label: '年检费用',
            property: '年检费用'
          }, {
            label: '罚款费用',
            property: '罚款费用'
          }, {
            label: '总费用',
            property: '总费用'
          }
        ]
        this.dyclfy.excelName = this.dyclfy.cph + '费用统计'
        this.dyclfy.tHeader = ['时间', '车牌号', '加油费用', '保养费用', '维修费用', '保险费用', '年检费用', '罚款费用', '总费用']
        this.dyclfy.filterVal = ['时间', '车牌号', '加油费用', '保养费用', '维修费用', '保险费用', '年检费用', '罚款费用', '总费用']
      }
      if (this.radio == '2') {
        if (this.check1 == false && this.check2 == false) {
          this.dyclfySearch = {
            carNo: this.dyclfy.cph,
            StartDate: '',
            endDate: '',
            season: '',
            month: '',
            year: this.dyclfy.year,
            type: 'E_年'
          }
          this.tableHead = [
            {
              label: '年份',
              property: '年份'
            }, {
              label: '月份',
              property: '月份'
            }, {
              label: '车牌号',
              property: '车牌号'
            }, {
              label: '加油费用',
              property: '加油费用'
            }, {
              label: '保养费用',
              property: '保养费用'
            }, {
              label: '维修费用',
              property: '维修费用'
            }, {
              label: '保险费用',
              property: '保险费用'
            }, {
              label: '年检费用',
              property: '年检费用'
            }, {
              label: '罚款费用',
              property: '罚款费用'
            }, {
              label: '总费用',
              property: '总费用'
            }
          ]
          this.dyclfy.excelName = this.dyclfy.cph + this.dyclfy.year + '费用统计'
          this.dyclfy.tHeader = ['年份', '月份', '车牌号', '加油费用', '保养费用', '维修费用', '保险费用', '年检费用', '罚款费用', '总费用']
          this.dyclfy.filterVal = ['年份', '月份', '车牌号', '加油费用', '保养费用', '维修费用', '保险费用', '年检费用', '罚款费用', '总费用']
        }
        if (this.check1 == true) {
          this.dyclfySearch = {
            carNo: this.dyclfy.cph,
            StartDate: '',
            endDate: '',
            season: this.dyclfy.season,
            month: '',
            year: this.dyclfy.year,
            type: 'E_季'
          }
          this.tableHead = [
            {
              label: '年份',
              property: '年份'
            }, {
              label: '月份',
              property: '月份'
            }, {
              label: '车牌号',
              property: '车牌号'
            }, {
              label: '加油费用',
              property: '加油费用'
            }, {
              label: '保养费用',
              property: '保养费用'
            }, {
              label: '维修费用',
              property: '维修费用'
            }, {
              label: '保险费用',
              property: '保险费用'
            }, {
              label: '年检费用',
              property: '年检费用'
            }, {
              label: '罚款费用',
              property: '罚款费用'
            }, {
              label: '总费用',
              property: '总费用'
            }
          ]
          this.dyclfy.excelName = this.dyclfy.cph + this.dyclfy.season + '费用统计'
          this.dyclfy.tHeader = ['年份', '月份', '车牌号', '加油费用', '保养费用', '维修费用', '保险费用', '年检费用', '罚款费用', '总费用']
          this.dyclfy.filterVal = ['年份', '月份', '车牌号', '加油费用', '保养费用', '维修费用', '保险费用', '年检费用', '罚款费用', '总费用']
        }
        if (this.check2 == true) {
          this.dyclfySearch = {
            carNo: this.dyclfy.cph,
            StartDate: '',
            endDate: '',
            season: '',
            month: this.dyclfy.month,
            year: this.dyclfy.year,
            type: 'E_月'
          }
          this.tableHead = [
            {
              label: '时间',
              property: '时间'
            }, {
              label: '车牌号',
              property: '车牌号'
            }, {
              label: '加油费用',
              property: '加油费用'
            }, {
              label: '保养费用',
              property: '保养费用'
            }, {
              label: '维修费用',
              property: '维修费用'
            }, {
              label: '保险费用',
              property: '保险费用'
            }, {
              label: '年检费用',
              property: '年检费用'
            }, {
              label: '罚款费用',
              property: '罚款费用'
            }, {
              label: '总费用',
              property: '总费用'
            }
          ]
          this.dyclfy.excelName = this.dyclfy.cph + this.dyclfy.year + this.dyclfy.month + '费用统计'
          this.dyclfy.tHeader = ['时间', '车牌号', '加油费用', '保养费用', '维修费用', '保险费用', '年检费用', '罚款费用', '总费用']
          this.dyclfy.filterVal = ['时间', '车牌号', '加油费用', '保养费用', '维修费用', '保险费用', '年检费用', '罚款费用', '总费用']
        }
      }
      let { data } = await this.$Http.get('/DataListCompany/GetDyclfyTjApi', { params: this.dyclfySearch })
      // let { data } = await this.$Http.get(`/DataListCompany/GetLisencePlateApi?ClientNo=${this.$route.query.ClientNo}`)
      // debugger
      // 原始数据
      this.dyclfy.tableData = data
      // console.log(data)
    },
    DyclfytjexportExcel () {
      // const excelName = document.querySelector('.group li.selected span').innerText + '报警信息'
      // const tHeader = ['人员编号', '姓名', '班组编号', '报警位置', '报警时间', '经度', '纬度', '报警类型']
      // const filterVal = ['VID', 'NAME', 'CLIENT_NO', 'address', 'ALARM_DATE', 'LONGITUDE', 'LATITUDE', 'ALARM_TYPE']
      export2Excel(this.dyclfy.tHeader, this.dyclfy.filterVal, this.dyclfy.tableData, this.dyclfy.excelName)
    },
    //关闭单一车辆费用统计
    closedyclfy () {
      this.dyclfy.show = false
    },
    //打开全部车辆费用统计
    openqbclfy () {
      this.qbclfy.show = true
    },
    //全部车辆费用统计查询
    async qbclSearchClick () {
      debugger
      if (this.qbclfy.check1 == false && this.qbclfy.check2 == false) {
        this.qbclfySearch = {
          clientNo: localStorage.getItem('CLIENT_NO'),
          season: '',
          month: '',
          year: this.qbclfy.year,
          type: '年'
        }
        this.qbclfy.tableHead = [
          {
            label: '年份',
            property: '年份'
          }, {
            label: '车牌号',
            property: '车牌号'
          }, {
            label: '加油费用',
            property: '加油费用'
          }, {
            label: '保养费用',
            property: '保养费用'
          }, {
            label: '维修费用',
            property: '维修费用'
          }, {
            label: '保险费用',
            property: '保险费用'
          }, {
            label: '年检费用',
            property: '年检费用'
          }, {
            label: '罚款费用',
            property: '罚款费用'
          }, {
            label: '总费用',
            property: '总费用'
          }
        ]
        this.qbclfy.excelName = '全部车辆' + this.qbclfy.year + '费用统计'
        this.qbclfy.tHeader = ['年份', '车牌号', '加油费用', '保养费用', '维修费用', '保险费用', '年检费用', '罚款费用', '总费用']
        this.qbclfy.filterVal = ['年份', '车牌号', '加油费用', '保养费用', '维修费用', '保险费用', '年检费用', '罚款费用', '总费用']
      }
      if (this.qbclfy.check1 == true) {
        this.qbclfySearch = {
          clientNo: localStorage.getItem('CLIENT_NO'),
          season: this.qbclfy.season,
          month: '',
          year: this.qbclfy.year,
          type: '季'
        }
        this.qbclfy.tableHead = [
          {
            label: '年份',
            property: '年份'
          }, {
            label: '季度',
            property: '季度'
          }, {
            label: '车牌号',
            property: '车牌号'
          }, {
            label: '加油费用',
            property: '加油费用'
          }, {
            label: '保养费用',
            property: '保养费用'
          }, {
            label: '维修费用',
            property: '维修费用'
          }, {
            label: '保险费用',
            property: '保险费用'
          }, {
            label: '年检费用',
            property: '年检费用'
          }, {
            label: '罚款费用',
            property: '罚款费用'
          }, {
            label: '总费用',
            property: '总费用'
          }
        ]
        this.qbclfy.excelName = '全部车辆' + this.qbclfy.season + '费用统计'
        this.qbclfy.tHeader = ['年份', '季度', '车牌号', '加油费用', '保养费用', '维修费用', '保险费用', '年检费用', '罚款费用', '总费用']
        this.qbclfy.filterVal = ['年份', '季度', '车牌号', '加油费用', '保养费用', '维修费用', '保险费用', '年检费用', '罚款费用', '总费用']
      }
      if (this.qbclfy.check2 == true) {
        this.qbclfySearch = {
          clientNo: localStorage.getItem('CLIENT_NO'),
          season: '',
          month: this.qbclfy.month,
          year: this.qbclfy.year,
          type: '月'
        }
        this.qbclfy.tableHead = [
          {
            label: '年份',
            property: '年份'
          }, {
            label: '月份',
            property: '月份'
          }, {
            label: '车牌号',
            property: '车牌号'
          }, {
            label: '加油费用',
            property: '加油费用'
          }, {
            label: '保养费用',
            property: '保养费用'
          }, {
            label: '维修费用',
            property: '维修费用'
          }, {
            label: '保险费用',
            property: '保险费用'
          }, {
            label: '年检费用',
            property: '年检费用'
          }, {
            label: '罚款费用',
            property: '罚款费用'
          }, {
            label: '总费用',
            property: '总费用'
          }
        ]
        this.qbclfy.excelName = '全部车辆' + this.qbclfy.year + this.qbclfy.month + '费用统计'
        this.qbclfy.tHeader = ['年份', '月份', '车牌号', '加油费用', '保养费用', '维修费用', '保险费用', '年检费用', '罚款费用', '总费用']
        this.qbclfy.filterVal = ['年份', '月份', '车牌号', '加油费用', '保养费用', '维修费用', '保险费用', '年检费用', '罚款费用', '总费用']
      }

      let { data } = await this.$Http.get('/DataListCompany/GetQbclfyTjApi', { params: this.qbclfySearch })
      // let { data } = await this.$Http.get(`/DataListCompany/GetLisencePlateApi?ClientNo=${this.$route.query.ClientNo}`)
      // debugger
      // 原始数据
      this.qbclfy.tableData = data
      console.log(data)
    },
    //全部车辆费用统计选择季度
    qbclfychangeCheck () {
      if (this.qbclfy.check1 == true) {
        this.qbclfy.check2 = false
      }
    },
    //全部车辆费用统计选择月
    qbclfychangeCheck2 () {
      if (this.qbclfy.check2 == true) {
        this.qbclfy.check1 = false
      }
    },
    QbclfytjexportExcel () {
      // const excelName = document.querySelector('.group li.selected span').innerText + '报警信息'
      // const tHeader = ['人员编号', '姓名', '班组编号', '报警位置', '报警时间', '经度', '纬度', '报警类型']
      // const filterVal = ['VID', 'NAME', 'CLIENT_NO', 'address', 'ALARM_DATE', 'LONGITUDE', 'LATITUDE', 'ALARM_TYPE']
      export2Excel(this.qbclfy.tHeader, this.qbclfy.filterVal, this.qbclfy.tableData, this.qbclfy.excelName)
    },
    //关闭全部车辆费用统计
    closeqbclfy () {
      this.qbclfy.show = false
    },
    //打开综合费用统计
    openzhfy () {
      this.zhfy.show = true
    },
    async zhfySearchClick () {
      if (this.zhfy.radio == '1') {
        this.zhfySearch = {
          clientNo: localStorage.getItem('CLIENT_NO'),
          StartDate: this.zhfy.startDate,
          endDate: this.zhfy.endDate,
          season: '',
          month: '',
          year: '',
          type: 'T_时间'
        }
        this.zhfy.tableHead = [
          {
            label: '时间',
            property: '时间'
          }, {
            label: '加油费用',
            property: '加油费用'
          }, {
            label: '保养费用',
            property: '保养费用'
          }, {
            label: '维修费用',
            property: '维修费用'
          }, {
            label: '保险费用',
            property: '保险费用'
          }, {
            label: '年检费用',
            property: '年检费用'
          }, {
            label: '罚款费用',
            property: '罚款费用'
          }, {
            label: '总费用',
            property: '总费用'
          }
        ]
        this.zhfy.excelName = '综合费用统计'
        this.zhfy.tHeader = ['时间', '加油费用', '保养费用', '维修费用', '保险费用', '年检费用', '罚款费用', '总费用']
        this.zhfy.filterVal = ['时间', '加油费用', '保养费用', '维修费用', '保险费用', '年检费用', '罚款费用', '总费用']
      }
      if (this.zhfy.radio == '2') {
        if (this.zhfy.check1 == false && this.zhfy.check2 == false) {
          this.zhfySearch = {
            carNo: this.zhfy.cph,
            StartDate: '',
            endDate: '',
            season: '',
            month: '',
            year: this.zhfy.year,
            type: 'T_年',
            clientNo: localStorage.getItem('CLIENT_NO')
          }
          this.zhfy.tableHead = [
            {
              label: '年份',
              property: '年份'
            }, {
              label: '月份',
              property: '月份'
            }, {
              label: '加油费用',
              property: '加油费用'
            }, {
              label: '保养费用',
              property: '保养费用'
            }, {
              label: '维修费用',
              property: '维修费用'
            }, {
              label: '保险费用',
              property: '保险费用'
            }, {
              label: '年检费用',
              property: '年检费用'
            }, {
              label: '罚款费用',
              property: '罚款费用'
            }, {
              label: '总费用',
              property: '总费用'
            }
          ]
          this.zhfy.excelName = this.zhfy.year + '费用统计'
          this.zhfy.tHeader = ['年份', '月份', '加油费用', '保养费用', '维修费用', '保险费用', '年检费用', '罚款费用', '总费用']
          this.zhfy.filterVal = ['年份', '月份', '加油费用', '保养费用', '维修费用', '保险费用', '年检费用', '罚款费用', '总费用']
        }
        if (this.zhfy.check1 == true) {
          this.zhfySearch = {
            carNo: this.zhfy.cph,
            StartDate: '',
            endDate: '',
            season: this.zhfy.season,
            month: '',
            year: this.zhfy.year,
            type: 'T_季',
            clientNo: localStorage.getItem('CLIENT_NO')
          }
          this.zhfy.tableHead = [
            {
              label: '年份',
              property: '年份'
            }, {
              label: '月份',
              property: '月份'
            }, {
              label: '加油费用',
              property: '加油费用'
            }, {
              label: '保养费用',
              property: '保养费用'
            }, {
              label: '维修费用',
              property: '维修费用'
            }, {
              label: '保险费用',
              property: '保险费用'
            }, {
              label: '年检费用',
              property: '年检费用'
            }, {
              label: '罚款费用',
              property: '罚款费用'
            }, {
              label: '总费用',
              property: '总费用'
            }
          ]
          this.zhfy.excelName = this.zhfy.season + '费用统计'
          this.zhfy.tHeader = ['年份', '月份', '加油费用', '保养费用', '维修费用', '保险费用', '年检费用', '罚款费用', '总费用']
          this.zhfy.filterVal = ['年份', '月份', '加油费用', '保养费用', '维修费用', '保险费用', '年检费用', '罚款费用', '总费用']
        }
        if (this.zhfy.check2 == true) {
          this.zhfySearch = {
            carNo: this.zhfy.cph,
            StartDate: '',
            endDate: '',
            season: '',
            month: this.zhfy.month,
            year: this.zhfy.year,
            type: 'T_月',
            clientNo: localStorage.getItem('CLIENT_NO')
          }
          this.zhfy.tableHead = [
            {
              label: '时间',
              property: '时间'
            }, {
              label: '加油费用',
              property: '加油费用'
            }, {
              label: '保养费用',
              property: '保养费用'
            }, {
              label: '维修费用',
              property: '维修费用'
            }, {
              label: '保险费用',
              property: '保险费用'
            }, {
              label: '年检费用',
              property: '年检费用'
            }, {
              label: '罚款费用',
              property: '罚款费用'
            }, {
              label: '总费用',
              property: '总费用'
            }
          ]
          this.zhfy.excelName = this.zhfy.year + this.zhfy.month + '费用统计'
          this.zhfy.tHeader = ['时间', '加油费用', '保养费用', '维修费用', '保险费用', '年检费用', '罚款费用', '总费用']
          this.zhfy.filterVal = ['时间', '加油费用', '保养费用', '维修费用', '保险费用', '年检费用', '罚款费用', '总费用']
        }
      }
      let { data } = await this.$Http.get('/DataListCompany/GetZhfyTjApi', { params: this.zhfySearch })
      // let { data } = await this.$Http.get(`/DataListCompany/GetLisencePlateApi?ClientNo=${this.$route.query.ClientNo}`)
      // debugger
      // 原始数据
      this.zhfy.tableData = data
    },
    //全部车辆费用统计选择季度
    zhfychangeCheck () {
      if (this.zhfy.check1 == true) {
        this.zhfy.check2 = false
      }
    },
    //全部车辆费用统计选择月
    zhfychangeCheck2 () {
      if (this.zhfy.check2 == true) {
        this.zhfy.check1 = false
      }
    },
    zhfytjexportExcel () {
      // const excelName = document.querySelector('.group li.selected span').innerText + '报警信息'
      // const tHeader = ['人员编号', '姓名', '班组编号', '报警位置', '报警时间', '经度', '纬度', '报警类型']
      // const filterVal = ['VID', 'NAME', 'CLIENT_NO', 'address', 'ALARM_DATE', 'LONGITUDE', 'LATITUDE', 'ALARM_TYPE']
      export2Excel(this.zhfy.tHeader, this.zhfy.filterVal, this.zhfy.tableData, this.zhfy.excelName)
    },
    //关闭综合费用统计
    closezhfy () {
      this.zhfy.show = false
    },
    //打开单一车辆油耗曲线窗口
    opendyclyhLine () {
      this.dyclyhLine.show = true
    },
    async dyclyhLineSearchClick () {
      const loading = this.$loading({
          lock: true,
          text: 'Loading',
          spinner: 'el-icon-loading',
          background: 'rgba(0, 0, 0, 0.7)'
        });
      var url = 'http://111.160.78.62:9935/api/EChartsYX/GetT0BarMultipurpose01?sqlName=&url=exec [GetOilHistoryLine] '+this.dyclyhLine.cph+','+this.dyclyhLine.timeInterval+',"'+this.dyclyhLine.startDate+'","'+this.dyclyhLine.endDate+'"'
      let { data } = await this.$Http.get(url)
      loading.close();
      // 绘制图表
      var myChart = echarts.init(document.getElementById('dyclyhLinediv'));
      myChart.setOption({
        xAxis: {
          type: 'category',
          data: data.categories
        },
        yAxis: {
          type: 'value'
        },
        series: [{
          type: 'line',
          smooth: true,
          data: data.data
        }]
      });
    },
    //打开单一车辆油耗里程统计
    opendyclyhlc () {
      this.dyclyhlc.show = true
    },
    //单一车辆油耗里程统计查询
    async dyclyhlcSearchClick () {
      var clientPara = localStorage.getItem('CLIENT_NO')
      if (this.dyclyhlc.cph == '津C95726'){
        clientPara = '0000025'
      }
      if (this.dyclyhlc.radio == '1') {
        this.dyclyhlcSearch = {
          carNo: this.dyclyhlc.cph,
          StartDate: this.dyclyhlc.startDate,
          endDate: this.dyclyhlc.endDate,
          season: '',
          month: '',
          year: '',
          type: '时间',
          clientNo: clientPara
        }
      }
      if (this.dyclyhlc.radio == '2') {
        if (this.dyclyhlc.check1 == false && this.dyclyhlc.check2 == false) {
          this.dyclyhlcSearch = {
            carNo: this.dyclyhlc.cph,
            StartDate: '',
            endDate: '',
            season: '',
            month: '',
            year: this.dyclyhlc.year,
            type: '年',
            clientNo: clientPara
          }
        }
        if (this.dyclyhlc.check1 == true) {
          this.dyclyhlcSearch = {
            carNo: this.dyclyhlc.cph,
            StartDate: '',
            endDate: '',
            season: this.dyclyhlc.season,
            month: '',
            year: this.dyclyhlc.year,
            type: '季度',
            clientNo: clientPara
          }
        }
        if (this.dyclyhlc.check2 == true) {
          this.dyclyhlcSearch = {
            carNo: this.dyclyhlc.cph,
            StartDate: '',
            endDate: '',
            season: '',
            month: this.dyclyhlc.month,
            year: this.dyclyhlc.year,
            type: '月',
            clientNo: clientPara
          }
        }
      }
      let { data } = await this.$Http.get('/DataListCompany/GetdyyhlcApi', { params: this.dyclyhlcSearch })
      this.dyclyhlc.tableData = data
    },
    dyclyhlcexportExcel () {
      const excelName = this.dyclyhlc.cph + '油耗里程统计'
      const tHeader = ['车牌号', '时间', '耗油量', '加油量', '加油次数', '行驶里程']
      const filterVal = ['车牌号', '时间', '耗油量', '加油量', '加油次数', '行驶里程']
      export2Excel(tHeader, filterVal, this.dyclyhlc.tableData, excelName)
    },

    dyclyhlcchangeCheck () {
      if (this.dyclyhlc.check1 == true) {
        this.dyclyhlc.check2 = false
      }
    },

    dyclyhlcchangeCheck2 () {
      if (this.dyclyhlc.check2 == true) {
        this.dyclyhlc.check1 = false
      }
    },
    //关闭单一车辆油耗里程统计
    closedyclyhlc () {
      this.dyclyhlc.show = false
    },
    //打开-全部车辆油耗里程统计
    openqbclyhlc () {
      this.qbclyhlc.show = true
    },
    async qbclyhlcSearchClick () {
      var clientPara = localStorage.getItem('CLIENT_NO')
      if (this.dyclyhlc.cph == '津C95726'){
        clientPara = '0000025'
      }
      if (this.qbclyhlc.check1 == false && this.qbclyhlc.check2 == false) {
        this.qbclyhlcSearch = {
          carNo: '',
          StartDate: '',
          endDate: '',
          season: '',
          month: '',
          year: this.qbclyhlc.year,
          type: '年',
          clientNo: clientPara
        }
        this.qbclyhlc.tableHead = [
          {
            label: '时间',
            property: '时间'
          }, {
            label: '车牌号',
            property: '车牌号'
          }, {
            label: '耗油量',
            property: '耗油量'
          }, {
            label: '加油量',
            property: '加油量'
          }, {
            label: '加油次数',
            property: '加油次数'
          }, {
            label: '行驶里程',
            property: '行驶里程'
          }
        ]
        // this.qbclyhlc.excelName=this.qbclyhlc.year+'费用统计'
        // this.qbclyhlc.tHeader=['时间','加油费用','保养费用','维修费用','保险费用','年检费用','罚款费用','总费用']
        // this.qbclyhlc.filterVal=['时间','加油费用','保养费用','维修费用','保险费用','年检费用','罚款费用','总费用']
      }
      if (this.qbclyhlc.check1 == true) {
        this.qbclyhlcSearch = {
          carNo: '',
          StartDate: '',
          endDate: '',
          season: this.qbclyhlc.season,
          month: '',
          year: this.qbclyhlc.year,
          type: '季度',
          clientNo: clientPara
        }
        this.qbclyhlc.tableHead = [
          {
            label: '时间',
            property: '时间'
          }, {
            label: '季度',
            property: '季度'
          },
          {
            label: '车牌号',
            property: '车牌号'
          }, {
            label: '耗油量',
            property: '耗油量'
          }, {
            label: '加油量',
            property: '加油量'
          }, {
            label: '加油次数',
            property: '加油次数'
          }, {
            label: '行驶里程',
            property: '行驶里程'
          }
        ]
      }
      if (this.qbclyhlc.check2 == true) {
        this.qbclyhlcSearch = {
          carNo: '',
          StartDate: '',
          endDate: '',
          season: '',
          month: this.qbclyhlc.month,
          year: this.qbclyhlc.year,
          type: '月',
          clientNo: clientPara
        }
        this.qbclyhlc.tableHead = [
          {
            label: '时间',
            property: '时间'
          }, {
            label: '月份',
            property: '月份'
          },
          {
            label: '车牌号',
            property: '车牌号'
          }, {
            label: '耗油量',
            property: '耗油量'
          }, {
            label: '加油量',
            property: '加油量'
          }, {
            label: '加油次数',
            property: '加油次数'
          }, {
            label: '行驶里程',
            property: '行驶里程'
          }
        ]
      }
      console.log(this.qbclyhlc.season + ',' + this.qbclyhlc.year)
      let { data } = await this.$Http.get('/DataListCompany/GetdyyhlcApi', { params: this.qbclyhlcSearch })
      // let { data } = await this.$Http.get(`/DataListCompany/GetLisencePlateApi?ClientNo=${this.$route.query.ClientNo}`)
      // debugger
      // 原始数据
      this.qbclyhlc.tableData = data
    },
    qbclyhlcexportExcel () {
      // const excelName ='油耗里程统计'
      // const tHeader = ['车牌号', '时间', '耗油量', '加油量', '加油次数', '行驶里程']
      // const filterVal = ['车牌号', '时间', '耗油量', '加油量', '加油次数', '行驶里程']
      export2Excel(tHeader, filterVal, this.dyclyhlc.tableData, excelName)
    },

    qbclyhlcchangeCheck () {
      if (this.qbclyhlc.check1 == true) {
        this.qbclyhlc.check2 = false
      }
    },

    qbclyhlcchangeCheck2 () {
      if (this.qbclyhlc.check2 == true) {
        this.qbclyhlc.check1 = false
      }
    },
    //关闭-全部车辆油耗里程统计
    closeqbclyhlc () {
      this.qbclyhlc.show = false
    },
    //打开-油耗里程综合统计
    openyhlczh () {
      this.yhlczh.show = true
    },
    async yhlczhSearchClick () {
      var clientPara = localStorage.getItem('CLIENT_NO')
      if (this.dyclyhlc.cph == '津C95726'){
        clientPara = '0000025'
      }
      if (this.yhlczh.check1 == false && this.yhlczh.check2 == false) {
        this.yhlczhSearch = {
          carNo: '',
          season: '',
          month: '',
          year: this.yhlczh.year,
          type: '年',
          clientNo: clientPara
        }
      }
      if (this.yhlczh.check1 == true) {
        this.yhlczhSearch = {
          carNo: '',
          season: this.yhlczh.season,
          month: '',
          year: this.yhlczh.year,
          type: '季度',
          clientNo: clientPara
        }
      }
      if (this.yhlczh.check2 == true) {
        this.yhlczhSearch = {
          carNo: '',
          season: '',
          month: this.yhlczh.month,
          year: this.yhlczh.year,
          type: '月',
          clientNo: clientPara
        }
      }
      let { data } = await this.$Http.get('/DataListCompany/GetzhyhlcApi', { params: this.yhlczhSearch })
      // let { data } = await this.$Http.get(`/DataListCompany/GetLisencePlateApi?ClientNo=${this.$route.query.ClientNo}`)
      // debugger
      // 原始数据
      this.yhlczh.tableData = data
    },
    yhlczhexportExcel () {
      const excelName = '油耗里程综合统计'
      const tHeader = ['时间', '耗油量', '加油量', '加油次数', '行驶里程']
      const filterVal = ['时间', '耗油量', '加油量', '加油次数', '行驶里程']
      export2Excel(tHeader, filterVal, this.yhlczh.tableData, excelName)
    },

    yhlczhchangeCheck () {
      if (this.yhlczh.check1 == true) {
        this.yhlczh.check2 = false
      }
    },

    yhlczhchangeCheck2 () {
      if (this.yhlczh.check2 == true) {
        this.yhlczh.check1 = false
      }
    },
    //关闭-油耗里程综合统计
    closeyhlczh () {
      this.yhlczh.show = false
    },
    //打开-单一车辆加水统计
    opendycljs () {
      this.dycljs.show = true
    },
    async dycljsSearchClick () {
      debugger
      if (this.dycljs.radio == '1') {
        this.dycljsSearch = {
          carNo: this.dycljs.cph,
          StartDate: this.dycljs.startDate,
          endDate: this.dycljs.endDate,
          season: '',
          month: '',
          year: '',
          type: '时间',
          clientNo: localStorage.getItem('CLIENT_NO')
        }
      }
      if (this.dycljs.radio == '2') {
        if (this.dycljs.check1 == false && this.dycljs.check2 == false) {
          this.dycljsSearch = {
            carNo: this.dycljs.cph,
            StartDate: '',
            endDate: '',
            season: '',
            month: '',
            year: this.dycljs.year,
            type: '年',
            clientNo: localStorage.getItem('CLIENT_NO')
          }
        }
        if (this.dycljs.check1 == true) {
          this.dycljsSearch = {
            carNo: this.dycljs.cph,
            StartDate: '',
            endDate: '',
            season: this.dycljs.season,
            month: '',
            year: this.dycljs.year,
            type: '季度',
            clientNo: localStorage.getItem('CLIENT_NO')
          }
        }
        if (this.dycljs.check2 == true) {
          this.dycljsSearch = {
            carNo: this.dycljs.cph,
            StartDate: '',
            endDate: '',
            season: '',
            month: this.dycljs.month,
            year: this.dycljs.year,
            type: '月',
            clientNo: localStorage.getItem('CLIENT_NO')
          }
        }
      }
      let { data } = await this.$Http.get('/DataListCompany/GetdycljsApi', { params: this.dycljsSearch })
      // let { data } = await this.$Http.get(`/DataListCompany/GetLisencePlateApi?ClientNo=${this.$route.query.ClientNo}`)
      // debugger
      // 原始数据
      this.dycljs.tableData = data
    },
    dycljsexportExcel () {
      const excelName = this.dycljs.cph + '油耗里程统计'
      const tHeader = ['车牌号', '时间', '耗油量', '加油量', '加油次数', '行驶里程']
      const filterVal = ['车牌号', '时间', '耗油量', '加油量', '加油次数', '行驶里程']
      export2Excel(tHeader, filterVal, this.dycljs.tableData, excelName)
    },

    dycljschangeCheck () {
      if (this.dycljs.check1 == true) {
        this.dycljs.check2 = false
      }
    },

    dycljschangeCheck2 () {
      if (this.dycljs.check2 == true) {
        this.dycljs.check1 = false
      }
    },
    //关闭-单一车辆加水统计
    closedycljs () {
      this.dycljs.show = false
    },
    //打开-全部车辆加水统计
    openqbcljs () {
      this.qbcljs.show = true
    },
    async qbcljsSearchClick () {
      debugger
      if (this.qbcljs.check1 == false && this.qbcljs.check2 == false) {
        this.qbcljsSearch = {
          carNo: '',
          StartDate: '',
          endDate: '',
          season: '',
          month: '',
          year: this.qbcljs.year,
          type: '年',
          clientNo: localStorage.getItem('CLIENT_NO')
        }
        this.qbcljs.tableHead = [
          {
            label: '时间',
            property: '时间'
          }, {
            label: '车牌号',
            property: '车牌号'
          }, {
            label: '加水量',
            property: '加水量'
          }, {
            label: '加水次数',
            property: '加水次数'
          }
        ]
        this.qbcljs.excelName = this.qbcljs.year + '加水统计'
        this.qbcljs.tHeader = ['时间', '车牌号', '加水量', '加水次数']
        this.qbcljs.filterVal = ['时间', '车牌号', '加水量', '加水次数']
      }
      if (this.qbcljs.check1 == true) {
        this.qbcljsSearch = {
          carNo: '',
          StartDate: '',
          endDate: '',
          season: this.qbcljs.season,
          month: '',
          year: this.qbcljs.year,
          type: '季度',
          clientNo: localStorage.getItem('CLIENT_NO')
        }
        this.qbcljs.tableHead = [
          {
            label: '时间',
            property: '时间'
          }, {
            label: '季度',
            property: '季度'
          },
          {
            label: '车牌号',
            property: '车牌号'
          }, {
            label: '加水量',
            property: '加水量'
          }, {
            label: '加水次数',
            property: '加水次数'
          }
        ]
        this.qbcljs.excelName = this.qbcljs.season + '加水统计'
        this.qbcljs.tHeader = ['时间', '季度', '车牌号', '加水量', '加水次数']
        this.qbcljs.filterVal = ['时间', '季度', '车牌号', '加水量', '加水次数']
      }
      if (this.qbcljs.check2 == true) {
        this.qbcljsSearch = {
          carNo: '',
          StartDate: '',
          endDate: '',
          season: '',
          month: this.qbcljs.month,
          year: this.qbcljs.year,
          type: '月',
          clientNo: localStorage.getItem('CLIENT_NO')
        }
        this.qbcljs.tableHead = [
          {
            label: '时间',
            property: '时间'
          }, {
            label: '月份',
            property: '月份'
          },
          {
            label: '车牌号',
            property: '车牌号'
          }, {
            label: '加水量',
            property: '加水量'
          }, {
            label: '加水次数',
            property: '加水次数'
          }
        ]
        this.qbcljs.excelName = this.qbcljs.month + '加水统计'
        this.qbcljs.tHeader = ['时间', '月份', '车牌号', '加水量', '加水次数']
        this.qbcljs.filterVal = ['时间', '月份', '车牌号', '加水量', '加水次数']
      }
      let { data } = await this.$Http.get('/DataListCompany/GetdycljsApi', { params: this.qbcljsSearch })
      // let { data } = await this.$Http.get(`/DataListCompany/GetLisencePlateApi?ClientNo=${this.$route.query.ClientNo}`)
      // debugger
      // 原始数据
      this.qbcljs.tableData = data
    },
    qbcljsexportExcel () {
      // const excelName ='油耗里程统计'
      // const tHeader = ['车牌号', '时间', '耗油量', '加油量', '加油次数', '行驶里程']
      // const filterVal = ['车牌号', '时间', '耗油量', '加油量', '加油次数', '行驶里程']
      export2Excel(this.qbcljs.tHeader, this.qbcljs.filterVal, this.qbcljs.tableData, this.qbcljs.excelName)
    },

    qbcljschangeCheck () {
      if (this.qbcljs.check1 == true) {
        this.qbcljs.check2 = false
      }
    },

    qbcljschangeCheck2 () {
      if (this.qbcljs.check2 == true) {
        this.qbcljs.check1 = false
      }
    },
    //关闭-全部车辆加水统计
    closeqbcljs () {
      this.qbcljs.show = false
    },
    //打开-加水综合统计
    openjszh () {
      this.jszh.show = true
    },
    async jszhSearchClick () {
      debugger
      if (this.jszh.check1 == false && this.jszh.check2 == false) {
        this.jszhSearch = {
          carNo: '',
          season: '',
          month: '',
          year: this.jszh.year,
          type: '年',
          clientNo: localStorage.getItem('CLIENT_NO')
        }
      }
      if (this.jszh.check1 == true) {
        this.jszhSearch = {
          carNo: '',
          season: this.jszh.season,
          month: '',
          year: this.jszh.year,
          type: '季度',
          clientNo: localStorage.getItem('CLIENT_NO')
        }
      }
      if (this.jszh.check2 == true) {
        this.jszhSearch = {
          carNo: '',
          season: '',
          month: this.jszh.month,
          year: this.jszh.year,
          type: '月',
          clientNo: localStorage.getItem('CLIENT_NO')
        }
      }
      let { data } = await this.$Http.get('/DataListCompany/GetzhjsApi', { params: this.jszhSearch })
      // let { data } = await this.$Http.get(`/DataListCompany/GetLisencePlateApi?ClientNo=${this.$route.query.ClientNo}`)
      // debugger
      // 原始数据
      this.jszh.tableData = data
    },
    jszhexportExcel () {
      const excelName = '加水综合统计'
      const tHeader = ['时间', '加水量', '加水次数']
      const filterVal = ['时间', '加水量', '加水次数']
      export2Excel(tHeader, filterVal, this.jszh.tableData, excelName)
    },

    jszhchangeCheck () {
      if (this.jszh.check1 == true) {
        this.jszh.check2 = false
      }
    },

    jszhchangeCheck2 () {
      if (this.jszh.check2 == true) {
        this.jszh.check1 = false
      }
    },
    //关闭-加水综合统计
    closejszh () {
      this.jszh.show = false
    },
    //打开-车辆用车统计
    openclyc () {
      this.clyc.show = true
    },
    async clycSearchClick () {
      debugger
      if (this.clyc.check1 == false && this.clyc.check2 == false) {
        this.clycSearch = {
          carNo: '',
          season: '',
          month: '',
          year: this.clyc.year,
          type: '年',
          clientNo: localStorage.getItem('CLIENT_NO')
        }
        this.clyc.tableHead = [
          {
            label: '时间',
            property: '时间'
          }, {
            label: '车牌号',
            property: '车牌号'
          }, {
            label: '用车次数',
            property: '用车次数'
          }, {
            label: '行驶里程',
            property: '行驶里程'
          }, {
            label: '行驶时间',
            property: '行驶时间'
          }
        ]
        this.clyc.excelName = this.clyc.year + '用车统计'
        this.clyc.tHeader = ['时间', '车牌号', '用车次数', '行驶里程', '行驶时间']
        this.clyc.filterVal = ['时间', '车牌号', '用车次数', '行驶里程', '行驶时间']
      }
      if (this.clyc.check1 == true) {
        this.clycSearch = {
          carNo: '',
          season: this.clyc.season,
          month: '',
          year: this.clyc.year,
          type: '季度',
          clientNo: localStorage.getItem('CLIENT_NO')
        }
        this.clyc.tableHead = [
          {
            label: '时间',
            property: '时间'
          }, {
            label: '季度',
            property: '季度'
          },
          {
            label: '车牌号',
            property: '车牌号'
          }, {
            label: '用车次数',
            property: '用车次数'
          }, {
            label: '行驶里程',
            property: '行驶里程'
          }, {
            label: '行驶时间',
            property: '行驶时间'
          }
        ]
        this.clyc.excelName = this.clyc.season + '用车统计'
        this.clyc.tHeader = ['时间', '季度', '车牌号', '用车次数', '行驶里程', '行驶时间']
        this.clyc.filterVal = ['时间', '季度', '车牌号', '用车次数', '行驶里程', '行驶时间']
      }
      if (this.clyc.check2 == true) {
        this.clycSearch = {
          carNo: '',
          season: '',
          month: this.clyc.month,
          year: this.clyc.year,
          type: '月',
          clientNo: localStorage.getItem('CLIENT_NO')
        }
        this.clyc.tableHead = [
          {
            label: '时间',
            property: '时间'
          }, {
            label: '月份',
            property: '月份'
          },
          {
            label: '用车次数',
            property: '用车次数'
          }, {
            label: '行驶里程',
            property: '行驶里程'
          }, {
            label: '行驶时间',
            property: '行驶时间'
          }
        ]
        this.clyc.excelName = this.clyc.month + '用车统计'
        this.clyc.tHeader = ['时间', '月份', '车牌号', '用车次数', '行驶里程', '行驶时间']
        this.clyc.filterVal = ['时间', '月份', '车牌号', '用车次数', '行驶里程', '行驶时间']
      }
      let { data } = await this.$Http.get('/DataListCompany/GetclycApi', { params: this.clycSearch })
      // let { data } = await this.$Http.get(`/DataListCompany/GetLisencePlateApi?ClientNo=${this.$route.query.ClientNo}`)
      // debugger
      // 原始数据
      this.clyc.tableData = data
    },
    clycexportExcel () {
      // const excelName ='油耗里程统计'
      // const tHeader = ['车牌号', '时间', '耗油量', '加油量', '加油次数', '行驶里程']
      // const filterVal = ['车牌号', '时间', '耗油量', '加油量', '加油次数', '行驶里程']
      export2Excel(this.clyc.tHeader, this.clyc.filterVal, this.clyc.tableData, this.clyc.excelName)
    },

    clycchangeCheck () {
      if (this.clyc.check1 == true) {
        this.clyc.check2 = false
      }
    },

    clycchangeCheck2 () {
      if (this.clyc.check2 == true) {
        this.clyc.check1 = false
      }
    },
    //关闭-车辆用车统计
    closeclyc () {
      this.clyc.show = false
    },
    //打开-司机出车统计
    opensjcc () {
      this.sjcc.show = true
    },
    async sjccSearchClick () {
      debugger
      if (this.sjcc.check1 == false && this.sjcc.check2 == false) {
        this.sjccSearch = {
          carNo: '',
          season: '',
          month: '',
          year: this.sjcc.year,
          type: '年',
          clientNo: localStorage.getItem('CLIENT_NO')
        }
        this.sjcc.tableHead = [
          {
            label: '时间',
            property: '时间'
          }, {
            label: '驾驶员',
            property: '驾驶员'
          }, {
            label: '用车次数',
            property: '用车次数'
          }, {
            label: '行驶里程',
            property: '行驶里程'
          }, {
            label: '行驶时间',
            property: '行驶时间'
          }
        ]
        this.sjcc.excelName = this.sjcc.year + '司机出车统计'
        this.sjcc.tHeader = ['时间', '驾驶员', '用车次数', '行驶里程', '行驶时间']
        this.sjcc.filterVal = ['时间', '驾驶员', '用车次数', '行驶里程', '行驶时间']
      }
      if (this.sjcc.check1 == true) {
        this.sjccSearch = {
          carNo: '',
          season: this.sjcc.season,
          month: '',
          year: this.sjcc.year,
          type: '季度',
          clientNo: localStorage.getItem('CLIENT_NO')
        }
        this.sjcc.tableHead = [
          {
            label: '时间',
            property: '时间'
          }, {
            label: '季度',
            property: '季度'
          },
          {
            label: '驾驶员',
            property: '驾驶员'
          }, {
            label: '用车次数',
            property: '用车次数'
          }, {
            label: '行驶里程',
            property: '行驶里程'
          }, {
            label: '行驶时间',
            property: '行驶时间'
          }
        ]
        this.sjcc.excelName = this.sjcc.season + '司机出车统计'
        this.sjcc.tHeader = ['时间', '季度', '驾驶员', '用车次数', '行驶里程', '行驶时间']
        this.sjcc.filterVal = ['时间', '季度', '驾驶员', '用车次数', '行驶里程', '行驶时间']
      }
      if (this.sjcc.check2 == true) {
        this.sjccSearch = {
          carNo: '',
          season: '',
          month: this.sjcc.month,
          year: this.sjcc.year,
          type: '月',
          clientNo: localStorage.getItem('CLIENT_NO')
        }
        this.sjcc.tableHead = [
          {
            label: '时间',
            property: '时间'
          }, {
            label: '月份',
            property: '月份'
          }, {
            label: '驾驶员',
            property: '驾驶员'
          },
          {
            label: '用车次数',
            property: '用车次数'
          }, {
            label: '行驶里程',
            property: '行驶里程'
          }, {
            label: '行驶时间',
            property: '行驶时间'
          }
        ]
        this.sjcc.excelName = this.sjcc.month + '司机出车统计'
        this.sjcc.tHeader = ['时间', '月份', '驾驶员', '用车次数', '行驶里程', '行驶时间']
        this.sjcc.filterVal = ['时间', '月份', '驾驶员', '用车次数', '行驶里程', '行驶时间']
      }
      let { data } = await this.$Http.get('/DataListCompany/GetsjccApi', { params: this.sjccSearch })
      // let { data } = await this.$Http.get(`/DataListCompany/GetLisencePlateApi?ClientNo=${this.$route.query.ClientNo}`)
      // debugger
      // 原始数据
      this.sjcc.tableData = data
    },
    sjccexportExcel () {
      // const excelName ='油耗里程统计'
      // const tHeader = ['车牌号', '时间', '耗油量', '加油量', '加油次数', '行驶里程']
      // const filterVal = ['车牌号', '时间', '耗油量', '加油量', '加油次数', '行驶里程']
      export2Excel(this.sjcc.tHeader, this.sjcc.filterVal, this.sjcc.tableData, this.sjcc.excelName)
    },

    sjccchangeCheck () {
      if (this.sjcc.check1 == true) {
        this.sjcc.check2 = false
      }
    },

    sjccchangeCheck2 () {
      if (this.sjcc.check2 == true) {
        this.sjcc.check1 = false
      }
    },
    //关闭-司机出车统计
    closesjcc () {
      this.sjcc.show = false
    },
    changeCheck () {
      if (this.check1 == true) {
        this.check2 = false
      }
    },
    changeCheck2 () {
      if (this.check2 == true) {
        this.check1 = false
      }
    },
    changeColumn () {
      //   this.tableHead=[
      //   {
      //       label:'姓名',
      //       property:'name'
      //   },{
      //       label:'地址',
      //       property:'address'
      //   }
      // ]
      this.getDychfytjList()
    }
  }
}
</script>

<style scoped lang='less'>
.public {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 20px;
  position: relative;
  cursor: default;
  // text-align: center;
  border-right: 2px solid #3baefa;
  & > span:hover {
    color: #3baefa;
  }
  .work_area_list {
    width: 220px;
    // height: 78px;
    border: 1px solid #ccc;
    background-color: #f3f3f3;
    position: absolute;
    top: 15px;
    z-index: 999999;
    span:last-child {
      border-bottom: 0;
    }
    span {
      display: block;
      padding: 0 10px 0 10px;
      line-height: 26px;
      color: #333;
      border-bottom: 1px solid #2ea9fa;
      &:hover {
        color: #fff;
        background-color: #2ea9fa;
      }
    }
    .size14 {
      width: 100%;
      display: flex;
      align-content: flex-start;
      font-weight: normal;
      font-size: 14px;
      padding: 10px 0 8px 15px;
      color: #909399;
    }
  }
}
.organization {
  width: 70%;
  height: 460px;
  padding: 0;
  padding-bottom: 10px;
  background-color: #fff;
  border: 1px solid #ccc;
  position: fixed;
  left: 50%;
  top: 130px;
  transform: translateX(-50%);
  z-index: 99;
  h2 {
    line-height: 30px;
    border-bottom: 1px solid #ccc;
    padding-left: 10px;
    color: #666;
    span {
      margin-right: 5px;
    }
    i {
      float: right;
      margin-right: 10px;
    }
  }
  .organization_content {
    height: calc(~'100% - 33px');
  }
}
.top_box {
  height: 50px;
  border-bottom: 1px solid #ccc;
  display: flex;
  // align-items: center;
  padding-top: 8px;
  padding-left: 20px;
  .el-form {
    height: 26px;
    .el-input {
      width: 150px;
    }
    .el-select {
      width: 150px;
    }
    /deep/.el-form-item {
      vertical-align: baseline;
      .el-button /deep/ span {
        margin-left: 0;
      }
    }
  }
}
.car_content {
  //   width: 100%;
  //   height: 492px;
  height: calc(~'100% - 63px');
  overflow: auto;
  //   overflow-x: auto;
  //   overflow-y: auto;
  .new_person {
    width: 400px;
    height: 450px;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin: 15px auto;
    box-shadow: 0 0 5px 2px #ccc;
    .icon-guanbi {
      float: right;
      margin-right: 10px;
    }
    .el-form {
      width: 260px;
      height: 180px;
      margin: 10px auto;
      background-color: #fff;
      .el-form-item {
        margin-bottom: 20px;
      }
      .btns {
        display: flex;
        align-items: center;
        justify-content: center;
        // padding-top: 10px;
        .el-button {
          margin: 0 10px;
          /deep/span {
            padding: 0 5px;
          }
        }
      }
    }
  }
}
.wid100 {
  width: 100% !important;
}
.attendance_work_time2 {
  width: 400px;
  height: 200px;
  background-color: #fff;
  border: 1px solid #ccc;
  position: fixed;
  left: 50%;
  top: 130px;
  transform: translateX(-50%);
  z-index: 89;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 5px 3px #ccc;
  h2 {
    line-height: 30px;
    border-bottom: 1px solid #ccc;
    padding-left: 10px;
    color: #666;
    span {
      margin-right: 5px;
    }
    i {
      float: right;
      margin-right: 10px;
    }
  }
  .attendance_content {
    .el-form {
      width: 400px;
      .attendance_btns {
        margin-top: 40px;
        text-align: center;
        .el-button {
          display: inline-block;
          padding: 0 10px;
          margin: 0 20px;
        }
      }
    }
  }
}
</style>